#include <bits/stdc++.h>
using namespace std;

const int N = 1e5 + 5;

char ans[N / 2][3];

int main() {
#ifndef __SKT__
    freopen("black.in", "r", stdin);
    freopen("black.out", "w", stdout);
#endif
    int b, w;
    while(scanf("%d%d", &b, &w) != EOF) {
        memset(ans, 0, sizeof(ans));
        int minn = min(b - 1, w - 1);
        int flag = 0;
        if(b > w) flag = 1;
        int tot = 0;
        for(int i = 0; i < minn; ++i) {
            if(flag == 0) {
                ans[tot][0] = ans[tot][1] = '@';
                ++tot;
                ans[tot][0] = ans[tot][1] = '.';
                ++tot;
            } else {
                ans[tot][0] = ans[tot][1] = '.';
                ++tot;
                ans[tot][0] = ans[tot][1] = '@';
                ++tot;
            }
        }
        if(flag == 0) {
            ans[tot][0] = ans[tot][1] = '@';
            ++tot;
        } else {
            ans[tot][0] = ans[tot][1] = '.';
            ++tot;
        }
        int maxx = max(b, w);
        int nd = maxx - minn;
        for(int i = 0; i < nd; ++i) {
            ans[tot][0] = '.';
            ans[tot][1] = '@';
            ++tot;
            if(flag == 0) {
                ans[tot][0] = ans[tot][1] = '@';
            } else {
                ans[tot][0] = ans[tot][1] = '.';
            }
            ++tot;
        }
        printf("%d %d\n", tot, 2);
        for(int i = 0; i < tot; ++i) {
            printf("%s\n", ans[i]);
        }
    }
    return 0;
}

